

import java.util.StringTokenizer;

import org.apache.log4j.Logger;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class Main {
	public static void main(String[] args) {
/*		Logger logger = Logger.getLogger(Main.class.getName());
		 logger.info("Entering application.");
		Configuration conf = new Configuration().configure();
		SessionFactory sf = conf.buildSessionFactory();
		Session sess = sf.openSession();
		System.out.println(sess);
		sf.close();
		sf.close();*/
		
/*		StringTokenizer st = new StringTokenizer("1026|", "|");
		System.out.println(st.nextToken());*/
		//String placeCode2 = st.nextToken();
		//placeCode2 = placeCode2.substring(0, placeCode2.length()-1);
		StringBuffer sb = new StringBuffer("aaa aaa aaa a");
		sb.delete(sb.lastIndexOf("a")-1, sb.lastIndexOf("a"));
		System.out.println(sb);
	}
}
